<?php
namespace app\admin\controller;
// use think\Db;
// use think\captcha\Captcha;
class Administratorrole extends Come{
    public function administratorrole(){
        if(isset($_POST['up'])){
            $role=input('param.role','','htmlspecialchars');
            $describe=input('param.describe','','htmlspecialchars');
            $time=time();
            $data=[
                'role'=>$role,
                'describe'=>$describe,
                'time'=>$time,
                
            ];

            $ret=db('administrator_role')->insertGetId($data);
            if($ret>0){
                $this->success('添加成功!','admin/administratorrole/administratorrole');
            }else{
                $this->error('添加失败');
            }
            
        }
        return $this->fetch('administratorrole');
    }
    
}